package User;

import Book.BookList;
import Operate.*;

public abstract class User {
    private String name;
    protected IOOperate[] ioOperate;

    public User(){}

    public User(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doOperate(int choice,BookList bookList){
        //拿到一个对象调用work方法，传入bookList
        ioOperate[choice].work(bookList);
    }

}
